package com.example.demo.lianxi;

import java.util.ArrayList;
import com.example.demo.*;

public class DotComBust {
    /*
   private GameHelper helper=new GameHelper();
    private ArrayList<DotCom> dotComList=new ArrayList<DotCom>();
    private int numOfGuesses=0;

    private void setUpGame(){
        DotCom one=new DotCom();
        one.setName("Pets.com");
        DotCom two=new DotCom();
        one.setName("eToys.com");
        DotCom three=new DotCom();
        one.setName("Go2.com");
        dotComList.add(one);
        dotComList.add(two);
        dotComList.add(three);
        System.out.println("you goal is to sink three dot coms.");
        System.out.println("Pets.com,eToys.com.Go2.com");
        System.out.println("try to sink them all in eht fewest number of guesses");
        for(DotCom dotComToTest:dotComList){
            ArrayList<String> newLocation=helper.placeDotCom(3);
            dotComToTest.setLocationCells(newLocation);
        }

    }

    private void startPlaying(){
        while (!dotComList.isEmpty()){
            String userGuess=helper.getUserInput("enter a guess");
            checkUserGuess(userGuess);
        }
        finashGame();
    }

    private void checkUserGuess(String userGuess){
        numOfGuesses++;
        String result="miss";
        for(result.equals("hit")){
            break;
        if(result.equals("kill")){
            dotComList.remove(dotComToTest);
            break;
        }}
        System.out.println(result);
    }

    private void finashGame(){
        System.out.println("all dot coms are dead!your stock is now worthless");

    if(numOfGuesses<=18){
        System.out.println("it only took you"+numOfGuesses+"guesses");
        System.out.println("you got out before your options sank.");
    }else{
        System.out.println("took you long enougth."+numOfGuesses+"guesses.");
        System.out.println("fish are dancing with your option");

    }
    }

    public  static void main(String args[]){
        DotComBust game=new DotComBust();
        game.setUpGame();
        game.startPlaying();
    }



     */


}
